package br.com.gaacorp.sai.webapp.action;

import java.io.Serializable;
import java.util.List;

import br.com.gaacorp.sai.webapp.action.BasePage;
import br.com.gaacorp.sai.model.Course;
import br.com.gaacorp.sai.service.GenericManager;

public class CourseList extends BasePage implements Serializable {
    /**
	 * 
	 */
	private static final long serialVersionUID = 3167602636583747352L;
	private GenericManager<Course, Long> courseManager;

    public void setCourseManager(GenericManager<Course, Long> courseManager) {
        this.courseManager = courseManager;
    }

    public CourseList() {
        setSortColumn("courseId"); // sets the default sort column
    }

    public List getCourses() {
        return sort(courseManager.getAll());
    }
}

